home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.windows.x,comp.security.misc,comp.sys.sun.admin
- From: anthony@kurango.cit.gu.edu.au (Anthony Thyssen)
- Subject: Re: xdm xlogin and passwd aging
- Message-ID: <C5Er01.DH4@kurango.cit.gu.edu.au>
- Organization: Griffith University.
- References: <1993Apr7.230347.11793@fallout.lonestar.org>
- Date: Tue, 13 Apr 1993 05:52:48 GMT
-
- castellanos@fallout.lonestar.org writes:
- | Does anyone have suggestions on how to implement password aging for X
- | terminal users logging in via xdm xlogin widget. Our environment is SunOS
- | 4.1.3, NCDware 2.4, NIS, NFS. Sun's password aging mechanism doesn't
- | support xlogin or NIS.
- |
- | Terry Castellanos Internet: castellt@tpd.eds.com
-
- Yes we have just setup password aging for xlogin on our system. Basically
- we just created a simple program to test password aging for users.
- The program pwexp prints the number of weeks before the passwd expires,
- 0 if the passwd is expired, or 999 if no passwd aging is in effect.
- This in the Xsession file (lauch user session script) we added the following
-
- --------------8<-----------CUT HERE--------------8<---------------
- # check for password expiry
- EXP_CHK="/usr/local/bin/pwexp"
- if [ -x /usr/local/bin/pwexp ]; then # is passwd expiry available?
- PW_EXP="`$EXP_CHK $USER`" # to be used later
- if [ $PW_EXP -eq "0" ]; then
- xmessage -name "Password Has Expired" -g +$Xcenter+10 \
- "Your password has expired, please change it.."
- xterm -g +$Xcenter+100 -ls -e /bin/passwd
- PW_EXP="`$EXP_CHK $USER`" # to be used later
- [ $PW_EXP -eq "0" ] && exit 0
- fi
- else # no passwd expiry on this machine
- PW_EXP=999
- fi
- unset EXP_CHK
-
- # .... a bit later .... after failsafe login test ....
-
- # present the MOTD and time to passwd expiry
- if [ ! -r $HOME/.hushlogin ]; then
- xmessage -name "MOTD" -file - -g +$Xcenter+200 </etc/motd &
- if [ $PW_EXP -le 3 ]; then
- xmessage -name "Password Expiry Information" -g +$Xcenter+100 \
- "Your password will expire within $PW_EXP week/s" &
- fi
- fi
-
- --------------8<-----------CUT HERE--------------8<---------------
-
- NOTE: xmessage is a great program available in the general X contrib area.
- the Xcenter variable is calculated from other information for positioning
- message windows.
-
- Anthony Thyssen - (SysProg @ Griffith University) anthony@cit.gu.edu.au
- ------------------------------------------------------------------------------
- Think of it as `Evolution in Action'! -- Larry Niven
- ------------------------------------------------------------------------------
-
-